# !/usr/bin/env python
"""
    __init__
    ~~~~~~~


    :Author: swq
    :Date: 2021/07/03 20:10 
"""
__version__ = "1.0"

import logging

from flask import Flask
from flask_debugtoolbar import DebugToolbarExtension

from api.extensions import db

logger = logging.getLogger(__name__)


def create_app():
    app = Flask(__name__)
    app.config.from_object("api.config.default.DefaultConfig")
    db.init_app(app)
    toolbar = DebugToolbarExtension()
    toolbar.init_app(app)
    return app


app = create_app()
